package com.cskaoyan.controller;

import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: Jackey
 * @Date: 2023/4/20 17:20
 **/

@Controller
@RequestMapping("/goods")
public class GoodsController {
    @Autowired
    GoodsService goodsService;
    @RequestMapping("/count")
    @ResponseBody
    public BaseRespVo goodsCount() {
        Integer goodsNum = goodsService.countGoods();
        return BaseRespVo.ok(goodsNum);
    }
}
